<?php

/*
	Settings:
		erst ab x buchstaben suchen
*/
$search = (isset($_GET['search'])) ? htmlspecialchars($_GET['search'],ENT_QUOTES):"";
$uniqueId = General::genHash(5);
$linksData['linkName'] = "Suche";
$linksData['linkHTML'] = "<form method='get' action='' name='search'>

	<input type='hidden' name='page' value='search' />
	<input type='text' id='".$uniqueId."' name='search' value='".$search."' style='width:120px' />
	<input type='submit' name='s' value='Suchen' />";

if(Settings::getInstance()->getSetting("search.useQuickSearch") == 0) {	
$linksData['linkHTML'] .= "	<div id='autocomplete_choices".$uniqueId."' class='searchComplete'></div>
	<script type='text/javascript' language='javascript'>
	  // <![CDATA[
	  new Ajax.Autocompleter('".$uniqueId."', 'autocomplete_choices".$uniqueId."', '".Settings::getInstance()->getSetting('General.urlToCMS')."search.php?do=quicksearch',{minChars:".Settings::getInstance()->getSetting("search.quickMinChar")."});
	  // ]]>";
}
$linksData['linkHTML'] .= "</script>
	</form>";
$links[$linksData['linkCatId']][] = $linksData;
?>